﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppDAL;
using AppUtility;

namespace AppBIZ
{
    public class BizPerson
    {
        ApplicationDatabaseDataContext db = new ApplicationDatabaseDataContext(Util.ConnectionString);
        public Person Login(Person person)
        {
            try
            {
            Person _person = db.Persons.Where(p => p.UserId == person.UserId && p.Password == person.Password).FirstOrDefault();
                return _person;
            }
            catch(Exception ex)
            {
                throw ex;
            }
           // return true;
        }
    }
}
